import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  // 区级综合看板
  {
    path: '/',
    name: 'index',
    component: () => import('../views/index.vue'),
    redirect: '/Composite', //默认打开
    children: [

      {
        path: '/Composite',
        name: '综合管理',
        component: () => import('../views/AreaComposite.vue')
      },
      {
        path: '/Vehicle',
        name: '道路机扫',
        component: () => import('../views/Vehicle.vue')
      },
      {
        path: '/Rubbish',
        name: '垃圾收运',
        component: () => import('../views/Rubbish.vue')
      },
      {
        path: '/Worker',
        name: '人工保洁',
        component: () => import('../views/Worker.vue')
      },
      {
        path: '/Wc',
        name: '公厕维保',
        component: () => import('../views/Wc.vue')
      },
    ]
  },
  // 市级综合看板
  {
    path: '/',
    name: 'indexCityComposite',
    component: () => import('../views/indexCityComposite.vue'),
    children: [
      {
        path: '/CityComposite',
        name: '市级综合管理',
        component: () => import('../views/CityComposite.vue')
      },
      {
        path: '/AreaComposite',
        name: '区级综合管理',
        component: () => import('../views/AreaComposite.vue')
      },
    ]
  },
  // 市级机扫看板
  {
    path: '/',
    name: 'indexCityVehicle',
    component: () => import('../views/indexCityVehicle.vue'),
    children: [
      {
        path: '/CityVehicle',
        name: '市级道路机扫',
        component: () => import('../views/CityVehicle.vue')
      },
      {
        path: '/AreaVehicle',
        name: '区级道路机扫',
        component: () => import('../views/AreaVehicle.vue')
      },
    ]
  },
  // 区级机扫看板
  {
    path: '/',
    name: 'indexAreaVehicle',
    component: () => import('../views/indexAreaVehicle.vue'),
    children: [
      {
        path: '/AreaVehicle1',
        name: '区级道路机扫',
        component: () => import('../views/AreaVehicle1.vue')
      },
    ]
  },
  // 市级垃圾收运
  {
    path: '/',
    name: 'indexCityRubbish',
    component: () => import('../views/indexCityRubbish.vue'),
    children: [
      {
        path: '/CityRubbish',
        name: '市级垃圾收运',
        component: () => import('../views/CityRubbish.vue')
      },
      {
        path: '/AreaRubbish',
        name: '区级垃圾收运',
        component: () => import('../views/AreaRubbish.vue')
      },
    ]
  },
  // 市级人工保洁
  {
    path: '/',
    name: 'indexCityWorker',
    component: () => import('../views/indexCityWorker.vue'),
    children: [
      {
        path: '/CityWorker',
        name: '市级人工保洁',
        component: () => import('../views/CityWorker.vue')
      },
      {
        path: '/AreaWorker',
        name: '区级人工保洁',
        component: () => import('../views/AreaWorker.vue')
      },
    ]
  },
  // 市级公厕维保
  {
    path: '/',
    name: 'indexCityWc',
    component: () => import('../views/indexCityWc.vue'),
    children: [
      {
        path: '/CityWc',
        name: '市级公厕维保',
        component: () => import('../views/CityWc.vue')
      },
      {
        path: '/AreaWc',
        name: '区级公厕维保',
        component: () => import('../views/AreaWc.vue')
      },
    ]
  },
  // 单独页面

  {
    path: '/indexVehicle',
    name: '道路机扫',
    component: () => import('../views/indexVehicle.vue')
  },
  {
    path: '/indexRubbish',
    name: '垃圾收运',
    component: () => import('../views/indexRubbish.vue')
  },
  {
    path: '/indexWorker',
    name: '人工保洁',
    component: () => import('../views/indexWorker.vue')
  },
  {
    path: '/indexWc',
    name: '公厕维保',
    component: () => import('../views/indexWc.vue')
  },
  {
    path: '/indexKitchen',
    name: '餐厨垃圾',
    component: () => import('../views/indexKitchen.vue')
  },
  {
    path: '/indexTerminal',
    name: '末端处置',
    component: () => import('../views/indexTerminal.vue')
  },
  // {
  //   path: '/indexCd',
  //   name: '成都',
  //   component: () => import('../views/indexCd.vue')
  // },
  // {
  //   path: '/indexCdNote',
  //   name: '成都适配',
  //   component: () => import('../views/indexCd.vue')
  // },
]
const router = new VueRouter({
  routes
})

export default router